package cn.netjava.junit;


import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.netjava.service.UserinfoService;

public class SpringTest {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@Test
	public void aopTest(){
		ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
		UserinfoService userinfoService = (UserinfoService)ctx.getBean("userinfoService");
		userinfoService.save("Netjava");
//		userinfoService.getUserinfoName(20);
//		userinfoService.update("netjava", 20);
	}

}
